package com.wang.controller;

import com.wang.entity.User;
import com.wang.service.impl.UserServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 愿青春不负梦想
 * @Description: TODO
 * @email 3062827964@qq.com
 * @date 2023-01-22 23:24
 */
@RestController
@RequestMapping("user")
public class UserController {

    @Autowired
    private UserServiceImpl userService;

    @GetMapping("all")
    public List<User> getAllUser(){
        return userService.queryAllUser();
    }
}
